﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebSite.Master" AutoEventWireup="true"
    CodeBehind="MaterialInfo.aspx.cs" Inherits="RN.ERP.Web.Material.Material.MaterialInfo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../../Scripts/ligerUI/js/plugins/ligerGrid.js"></script>
    <script type="text/javascript" src="../../Scripts/ligerUI/js/plugins/ligerLayout.js"></script>
    <script type="text/javascript">
        function OpenAlert(text) {
            $.ligerDialog.warn(text);
            return false;
        }
        $(function () {

            $(".imgZoom").click(function () {
                $.ligerDialog.open({ url: "MClass.aspx?Code=EmpTitleDetails", width: 400, height: 450, title: '请选择物资分类', isResize: true, allowClose: false });
                return false;
            });
            //            $("#SpecTree").ligerTree({
            //                nodeWidth: 300,
            //                url: 'MaterialHandler.ashx?pid=0',
            //                attribute: ['nodename', 'id'],
            //                onBeforeExpand: onBeforeExpand,
            //                isExpand: function (e) {
            //                    var data = e.data;
            //                    return data.isexpand;
            //                },
            //                onCheck: onCheck,
            //                checkbox: true,
            //                single: true,
            //                slide: true
            //            });

            //            manager = $("#SpecTree").ligerGetTreeManager();
            //            function onBeforeExpand(note) {
            //                var data = note.data;
            //                //防止重复加载,使用isloaded 标记
            //                if ($("#" + note.data.id).data("isloaded")) {
            //                    return;
            //                }
            //                manager.loadData(note.target, 'MaterialHandler.ashx?pid=' + data.id);
            //                $("#" + note.data.id).data("isloaded", true);
            //            }
            //            function onCheck(node, checked) {
            //                if (checked) {
            //                    $("#hdnMCCode").val(node.data.id);
            //                    $("#hdnMCName").val(node.data.text);
            //                }
            //                //                $.getJSON('<%=Page.ResolveUrl("~/Person/PersonExpSpecialityInfo.aspx")%>', { "action": "GetSpecTitle", "id": note.data.id, "rand": Math.random() }, function (data) {
            //                //                    if (data.Result == true) {
            //                //                        $("#lblTitle").html(data.Message);
            //                //                    }
            //                //                });
            //            }

        })
        $(".imgZoom").click(function () {
            $.ligerDialog.open({ url: "MClass.aspx?Code=EmpTitleDetails&manual=" + manualID, width: 400, height: 450, title: '', isResize: true, allowClose: false, buttons: [{ text: '关闭', onclick: function (item, dialog) { dialog.close(); RefreshWin() } }] });
            return false;
        });
        function RefreshWin() {
            location.href = location.href;
        }
        function OnClientCloseCertType(args) {
            var arg = args;
            if (arg) {
                if (arg.Result == 0) {
                    return;
                }
                if (arg != undefined && arg.code != '' && arg.name != '') {
                    $("#hdnMCCode").val(arg.code);
                    $("#hdnMCName").val(arg.name);
                    $("#txtClass").val(arg.name);
                }
            }
        }
        function CloseWin() {
            parent.window.CloseWin("1");
            window.parent.$.ligerDialog.close(); ////关闭dialog
            parent.$(".l-dialog,.l-window-mask").hide(); ////去除父窗体遮罩层
        }
    </script>
    <style type="text/css">
        .cell-label
        {
            width: 80px;
        }
        #tabcontainer .l-tab-links
        {
            border-top: 1px solid #D0D0D0;
            border-left: 1px solid #D0D0D0;
            border-right: 1px solid #D0D0D0;
        }
        
        .projectgrid .l-selected .l-grid-row-cell, .projectgrid .l-selected
        {
            background: none;
        }
        
        .access-icon
        {
            background: url(../images/checkbox.gif) 0px 0px;
            height: 13px;
            line-height: 13px;
            width: 13px;
            margin: 4px 20px;
            display: block;
            cursor: pointer;
        }
        .access-icon-selected
        {
            background-position: 0px -13px;
        }
        .l-panel td.l-grid-row-cell-editing
        {
            padding-bottom: 2px;
            padding-top: 2px;
        }
        .imgZoom
        {
            display: block;
            width: 16px;
            height: 16px;
            background: url(../images/magnifying.jpg) no-repeat;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField ID="hdnId" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnType" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnCode" runat="server" ClientIDMode="Static" />
    <div id="layout" style="margin: 2px; margin-right: 3px;">
        <div class="xian">
            <div class="about_title">
                物资管理</div>
        </div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td width="1%" class="title_lbg IE6png">
                </td>
                <td width="2%" class="title_t IE6png">
                </td>
                <td width="96%" class="title_libg IE6png">
                    物资基本信息
                </td>
                <td width="1%" class="title_rbg IE6png">
                </td>
            </tr>
            <tr id="tbCorp" runat="server">
                <td class="border_lbg IE6png">
                    &nbsp;
                </td>
                <td colspan="2" style="padding-top: 16px; padding-left: 6px; padding-right: 6px;">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab" style="margin-bottom: 15px;">
                        <tr>
                            <td width="130" bgcolor="#f2f2f2">
                                <strong>物资名称</strong>
                            </td>
                            <td style="text-align: left;" colspan="3">
                                <asp:TextBox ID="txtName" runat="server" Width="60%" CssClass="rn-input-text"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="130" bgcolor="#f2f2f2">
                                <strong>物资分类</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtClass" ClientIDMode="Static" runat="server" Width="50%" Enabled="false"
                                    CssClass="text_css"></asp:TextBox>
                                <a href="javascript:void(0)" title="选择物资分类" class="imgZoom" id="certTypeA" style="background-image: url('../../Styles/skins/ytblue/images/magnifying.jpg');
                                    background-repeat: no-repeat"></a>
                                <asp:HiddenField ID="hdnMCCode" runat="server" ClientIDMode="Static" />
                                <asp:HiddenField ID="hdnMCName" runat="server" ClientIDMode="Static" />
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>物资数量</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:TextBox ID="txtMNum" runat="server" CssClass="rn-input-text" Width="45%" MaxLength="8"></asp:TextBox>单位:<asp:DropDownList
                                    ID="ddlUnit" runat="server" Width="60">
                                </asp:DropDownList>
                            </td>
                            <td bgcolor="#f2f2f2" width="130">
                                <strong>物资估算单价</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:TextBox ID="txtMEval" runat="server" CssClass="rn-input-text" Width="60%" MaxLength="20"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                物资属性
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:CheckBoxList ID="cbInfo" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                    <asp:ListItem Value="1">是否可转资产</asp:ListItem>
                                    <asp:ListItem Value="2">是否借用</asp:ListItem>
                                    <asp:ListItem Value="3">是否销售</asp:ListItem>
                                    <asp:ListItem Value="4">是否出样</asp:ListItem>
                                </asp:CheckBoxList>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>备注</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtAreMemo" runat="server" TextMode="MultiLine" Width="50%" Height="100px"
                                    CssClass="rn-input-text"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: 15px;">
                        <tr>
                            <td width="200">
                                &nbsp;
                            </td>
                            <td width="100" style="text-align: center;">
                            </td>
                            <td width="100">
                                <%-- <div class="icon02 IE6png">
                                <asp:LinkButton ID="lbtnReturn" runat="server" CssClass="return_a" ClientIDMode="Static">返回</asp:LinkButton>
                            </div>--%>
                            </td>
                            <td width="200">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="border_rbg IE6png">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="border_lconer IE6png" headers="17">
                    &nbsp;
                </td>
                <td colspan="2" class="border_bottomli IE6png" height="17">
                    &nbsp;
                </td>
                <td class="border_rconer IE6png" headers="17">
                    &nbsp;
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td width="1%" class="title_lbg IE6png">
                </td>
                <td width="2%" class="title_t IE6png">
                </td>
                <td width="96%" class="title_libg IE6png">
                    物资属性信息
                </td>
                <td width="1%" class="title_rbg IE6png">
                </td>
            </tr>
            <tr id="Tr1" runat="server">
                <td class="border_lbg IE6png">
                    &nbsp;
                </td>
                <td colspan="2" style="padding-top: 16px; padding-left: 6px; padding-right: 6px;">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab" style="margin-bottom: 15px;">
                        <tr>
                            <td width="130" bgcolor="#f2f2f2">
                                <strong>请选择物资属性类型</strong>
                            </td>
                            <td style="text-align: left;">
                                <asp:DropDownList ID="ddlMPClass" runat="server" Width="50%" OnSelectedIndexChanged="ddlMPClass_SelectedIndexChanged"
                                    AutoPostBack="True">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <asp:Repeater ID="rptMPInfo" runat="server" OnItemDataBound="rptMPInfo_ItemDataBound">
                            <ItemTemplate>
                                <%# Container.ItemIndex%2==0? "<tr>":"" %>
                                <td width="130" bgcolor="#f2f2f2">
                                    <%# Eval("cMPIName")%>
                                </td>
                                <td width="25%" style="text-align: left;">
                                    <asp:HiddenField ID="hdnCode" runat="server" Value='<%# Eval("cMPICode") %>' />
                                    <asp:HiddenField ID="hdniMPIKind" runat="server" Value='<%# Eval("iMPIKind") %>' />
                                    <asp:HiddenField ID="hdncMPIInfo" runat="server" Value='<%# Eval("cMPIInfo") %>' />
                                    <asp:TextBox ID="txtSingle" Width="50%" runat="server" Visible="false" CssClass="rn-input-text"></asp:TextBox>
                                    <asp:TextBox ID="txtMulti" Width="50%" runat="server" Height="50px" Visible="false"
                                        CssClass="rn-input-text" TextMode="MultiLine"></asp:TextBox>
                                    <asp:DropDownList ID="ddlSelect" runat="server" Width="50%" Visible="false">
                                    </asp:DropDownList>
                                    <asp:CheckBoxList ID="cbSelect" runat="server" Width="50%" Visible="false" RepeatDirection="Horizontal"
                                        RepeatLayout="Flow">
                                    </asp:CheckBoxList>
                                </td>
                                <%# Container.ItemIndex % 2 == 1 ? "</tr>" : ""%>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: 15px;">
                        <tr>
                            <td width="200">
                                &nbsp;
                            </td>
                            <td width="100" style="text-align: center;">
                                <div runat="server" id="dv1" class="icon01 IE6png">
                                    <asp:LinkButton ID="LinkButton1" runat="server" ValidationGroup="aa" OnClick="lbtnSave_Click">保存</asp:LinkButton>
                                </div>
                            </td>
                            <td width="100">
                                <%-- <div class="icon02 IE6png">
                                <asp:LinkButton ID="lbtnReturn" runat="server" CssClass="return_a" ClientIDMode="Static">返回</asp:LinkButton>
                            </div>--%>
                            </td>
                            <td width="200">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="border_rbg IE6png">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="border_lconer IE6png" headers="17">
                    &nbsp;
                </td>
                <td colspan="2" class="border_bottomli IE6png" height="17">
                    &nbsp;
                </td>
                <td class="border_rconer IE6png" headers="17">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
